package com.gxp.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gxp.common.annotation.Excel;
import com.gxp.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 审计对象 zk_audit
 *
 * @author zh
 * @date 2024-12-09
 */
public class ZkAudit extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long auditId;

    /** 操作模块 */
    @Excel(name = "操作模块")
    private String title;

    /** 操作类型 */
    @Excel(name = "操作类型")
    private Integer type;

    /* 操作类型数组 */
    private Integer[] types;

    /** service/client/web */
    @Excel(name = "service/client/web")
    private String wher;

    /** 操作内容 */
    @Excel(name = "操作内容")
    private String what;

    /** 系统版本 */
    @Excel(name = "系统版本")
    private String version;

    /** 备注 */
    @Excel(name = "备注")
    private String comment;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date time;

    /** 操作人 */
    @Excel(name = "操作人")
    private String who;

    private String role;

    /** ip地址 */
    @Excel(name = "ip地址")
    private String ip;

    /** 操作状态 */
    private String operStatus;

    /** 操作结果 */
    private String errorMsg;

    /** 请求参数 */
    private String auditParams;

    /**
     * 实体ID
     */
    private Long entityId;

    public void setAuditId(Long auditId)
    {
        this.auditId = auditId;
    }

    public Long getAuditId()
    {
        return auditId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setType(Integer type)
    {
        this.type = type;
    }

    public Integer getType()
    {
        return type;
    }
    public void setWher(String wher)
    {
        this.wher = wher;
    }

    public String getWher()
    {
        return wher;
    }
    public void setWhat(String what)
    {
        this.what = what;
    }

    public String getWhat()
    {
        return what;
    }
    public void setVersion(String version)
    {
        this.version = version;
    }

    public String getVersion()
    {
        return version;
    }
    public void setComment(String comment)
    {
        this.comment = comment;
    }

    public String getComment()
    {
        return comment;
    }
    public void setTime(Date time)
    {
        this.time = time;
    }

    public Date getTime()
    {
        return time;
    }
    public void setWho(String who)
    {
        this.who = who;
    }

    public String getWho()
    {
        return who;
    }
    public void setIp(String ip)
    {
        this.ip = ip;
    }

    public String getIp()
    {
        return ip;
    }
    public void setErrorMsg(String errorMsg)
    {
        this.errorMsg = errorMsg;
    }

    public String getErrorMsg()
    {
        return errorMsg;
    }

    public String getOperStatus() {
        return operStatus;
    }

    public void setOperStatus(String operStatus) {
        this.operStatus = operStatus;
    }

    public String getAuditParams() {
        return auditParams;
    }

    public void setAuditParams(String auditParams) {
        this.auditParams = auditParams;
    }

    public Integer[] getTypes() {
        return types;
    }

    public void setTypes(Integer[] types) {
        this.types = types;
    }

    public Long getEntityId() {
        return entityId;
    }

    public void setEntityId(Long entityId) {
        this.entityId = entityId;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("auditId", getAuditId())
                .append("title", getTitle())
                .append("type", getType())
                .append("where", getWher())
                .append("what", getWhat())
                .append("version", getVersion())
                .append("comment", getComment())
                .append("time", getTime())
                .append("who", getWho())
                .append("ip", getIp())
                .append("operStatus", getOperStatus())
                .append("errorMsg", getErrorMsg())
                .append("auditParams", getAuditParams())
                .toString();
    }
}
